nice_things/path/dir_name.sh
dir_name
Since 0.3.0 · Source
import "{ dir_name }" from nice_things/path/dir_name.sh
Synopsisdir_name <out_var> <pathname>
Configuration
–
Description
Get the directory portion of <pathname>, with the last component removed.
The result is similar to the dirname utility specified in POSIX.
Options
–
Operands
<out_var>: Output variable; the result will be written to this variable.<pathname>: A path name.
Stdin
–
Stdout
–
Stderr
–
Exit status0: Successful completion.
Abort
–
Usage examples
# Get directory of current program
dir_name program_dir "$0"